package com.nuorui.common.core.enums;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONAware;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.CaseFormat;
import lombok.Data;

import java.util.LinkedHashMap;
import java.util.Objects;

/**
 * 枚举类接口
 *
 * @Author 1024创新实验室: 胡克
 * @Date 2018-07-17 21:22:12
 * @Wechat zhuoda1024
 * @Email lab1024@163.com
 * @Copyright  <a href="https://1024lab.net">1024创新实验室</a>
 */
public interface BaseEnum<T> {
    T getValue();
    String getDesc();

    default boolean equalsValue(T value) {
        return Objects.equals(getValue(), value);
    }

    default boolean equals(BaseEnum<T> baseEnum) {
        return Objects.equals(getValue(), baseEnum.getValue()) &&
                Objects.equals(getDesc(), baseEnum.getDesc());
    }
}